//
//  AppConfig.h
//  SleepingElf
//
//  Created by karong on 2023/10/8.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
@class SleepConfig;
@class XiaoQiConfig;
@interface AppConfig : NSObject
+ (instancetype)defaultSession;
@property (nonatomic, strong) NSString * aes_key;
@property (nonatomic, strong) NSString * aes_iv;
@property (nonatomic, assign) NSTimeInterval time_difference;
@property (nonatomic, strong) NSArray * lastMusicArray;
/// 0 、列表播放 1、列表循环播放 2、单曲循环 3、随机播放
@property (nonatomic, assign) NSInteger playStatus;
@property (nonatomic, assign) BOOL playList;
/// 语言 0、繁体 1、英语 
@property (nonatomic, assign) NSInteger languageType;
@property (nonatomic, strong) NSMutableArray * playHistory;
- (void)addHistoryMusic:(MusicModel *)music;

@property (nonatomic, strong) SleepConfig * sleepConfig;
@property (nonatomic, strong) XiaoQiConfig * xiaoQiConfig;
//1 小憩 2 睡眠
@property (nonatomic, assign) NSInteger wakeUpType;

- (void)starWakeUpTimeKeeper:(NSTimeInterval)keepTime;
- (void)stopWakeUpTimeKeeper;

- (void)starMusicTimeKeeper:(NSTimeInterval)keepTime;
- (void)stopMusicTimeKeeper;


- (void)defaultTimeKeeper;
@end

///唤醒配置
@interface SleepConfig : NSObject
///是否定时关闭音频
@property (nonatomic, assign) BOOL autoClose;
///0、15min 1、30min 2、60min 3、90min 4、自定义
@property (nonatomic, assign) NSInteger autoCloseTimeType;
@property (nonatomic, assign) NSInteger autoCloseTime;
///闹钟音频链接
@property (nonatomic, strong) NSString * url;
///闹钟音频名称
@property (nonatomic, strong) NSString * title;
///是否震动
@property (nonatomic, assign) BOOL shake;
///是否外放
@property (nonatomic, assign) BOOL outPlay;
///闹钟时间
@property (nonatomic, assign) NSTimeInterval time;
///重复播放时间间隔
@property (nonatomic, assign) NSInteger playAgainMint;
///重复播放次数
@property (nonatomic, assign) NSInteger playAgainTime;
- (void)starTimeKeeper;
@end

///唤醒配置
@interface XiaoQiConfig : NSObject
///闹钟音频链接
@property (nonatomic, strong) NSString * url;
///闹钟音频名称
@property (nonatomic, strong) NSString * title;
///是否外放
@property (nonatomic, assign) BOOL outPlay;
///闹钟时间
@property (nonatomic, assign) NSTimeInterval time;
- (void)starTimeKeeper;
@end
NS_ASSUME_NONNULL_END
